package com.ruoyi.yljf.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.yljf.mapper.SendMapper;
import com.ruoyi.yljf.domain.Send;
import com.ruoyi.yljf.service.ISendService;

/**
 * 用户赠送表Service业务层处理
 * 
 * @author TATAT
 * @date 2025-03-25
 */
@Service
public class SendServiceImpl extends ServiceImpl<SendMapper, Send> implements ISendService {
    @Autowired
    private SendMapper sendMapper;
    
    /**
     * 查询用户赠送表列表
     * 
     * @param send 用户赠送表
     * @return 用户赠送表
     */
    @Override
    public List<Send> selectSendList(Send send) {
    	LambdaQueryWrapper<Send> queryWrapper = Wrappers.lambdaQuery();
        if (StringUtils.isNotNull(send.getReceiveUserId())) {
			queryWrapper.eq(Send::getReceiveUserId, send.getReceiveUserId());
		}
        if (StringUtils.isNotNull(send.getOrderId())) {
			queryWrapper.eq(Send::getOrderId, send.getOrderId());
		}
        return sendMapper.selectList(queryWrapper);
    }
}
